package Facade;

public class FacadePattern {
    public static void main(String[] args) {
        Facade facade = new Facade();
        facade.method();
    }
}
//外观角色
class Facade{
    private SubSystem01 sub1 = new SubSystem01();
    private SubSystem02 sub2 = new SubSystem02();
    public void method(){
        sub1.method1();
        sub2.method2();
    }
}
//子系统角色
class SubSystem01{
    public void method1(){
        System.out.println("子系统01的method");
    }
}
class SubSystem02{
    public void method2(){
        System.out.println("子系统02的method");
    }
}

















